import service from '@/utils/https';
import type { API } from '@/utils/api';

/**
 * 登录
 * @param params 要传的参数值，非必传
 * @returns 返回接口数据
 */
const postLogin = (params?: object): Promise<API.responseType> => {
	return service({
		url: 'auth/login',
		method: 'post',
		data: params,
	})
}

/**
 * 获取用户信息
 */
const getUserInfo = (params?: object): Promise<API.responseType> => {
	return service({
		url: 'system/user/getInfo',
		method: 'get',
		params
	})
}


export default {
	postLogin,
	getUserInfo
}